﻿<%@ Page Language="C#" MasterPageFile="~/aspnet/admin/ForValidation.master" AutoEventWireup="true" CodeFile="CX_Collert_Class_Edit.aspx.cs" Inherits="aspnet_admin_bock_CX_Collert_Class_Edit" Title="修改采集信息页面" %>
<%@ Register Assembly="web表单验证控件" Namespace="CheckForm" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
<script language="javascript" type="text/javascript" src="../../inc/js/ajaxrequest.js"></script>

 <table align="center" border="0" cellpadding="2" cellspacing="1" class="border"
        height="116" width="100%">
        <tr>
            <td align="center" class="topbg" colspan="2" style="height: 30px">
                <strong>采集管理</strong></td>
        </tr>
        <tr>
            <td class="tdbg" style="width: 223px; height: 27px">
                提示信息:</td>
            <td class="tdbg" style="width: 787px; height: 27px">
                <asp:Label ID="tt" runat="server" CssClass="font-4" Text="此功能比较复杂 采集数据时 请按步骤一步步 完成"></asp:Label></td>
        </tr>
    </table>
    <br />
    <table align="center" border="0" cellpadding="2" cellspacing="1" class="border"
        height="116" width="100%">
        <tr align="center">
            <td class="topbg" colspan="3" height="30">
                <strong>添加新类别</strong></td>
        </tr>
        <tr>
            <td class="tdbg" style="height: 27px" width="223">
                添加采集名称:</td>
            <td class="tdbg" style="height: 27px" colspan="2">
                &nbsp;<cc1:formvalidation id="CX_Collect_Class_Name" runat="server" cssclass="alpha" datatype="Require"
                    msgx="请填写栏目名" width="474px" 是否验试="验试" MaxLength="200"></cc1:formvalidation></td>
        </tr>
        <tr>
            <td class="tdbg" style="height: 27px" width="223">
                请选择新闻分类:</td>
            <td colspan="2" class="tdbg" style="height: 27px">
                <asp:Label ID="ColumnID" runat="server" ></asp:Label>
             
                
                </td>
        </tr>
        <tr>
            <td class="tdbg" style="height: 27px">
                采集数据页面:</td>
            <td class="tdbg" style="height: 27px" colspan="2">
                <label>
                    &nbsp;<cc1:FormValidation ID="CX_Collect_Class_Page" runat="server" CssClass="alpha" Width="496px" datatype="Url" MaxLength="450" 是否验试="验试"></cc1:FormValidation></label></td>
        </tr>
        <tr>
            <td class="tdbg" style="height: 27px">
                采集编码:</td>
            <td class="tdbg" style="height: 27px" colspan="2">
                
                
                <select id="CX_Collect_Class_CharSet" runat="server">
                    <option value="UTF-8" selected="selected" >UTF-8</option>
                    <option value="GB2312">GB2312</option>
                </select>
                &nbsp;
                </td>
        </tr>
        <tr>
            <td class="tdbg" style="height: 27px">
                模板地址(默认与新闻相同):</td>
            <td class="tdbg" style="height: 27px" colspan="2">
                <cc1:formvalidation id="CX_Collect_Class_Itemplitate" runat="server" cssclass="alpha" datatype="Require"
                    width="474px" 是否验试="验试" MaxLength="300"></cc1:formvalidation>
                (*)使用绝对路径</td>
        </tr>
        <tr>
            <td class="tdbg" style="height: 27px">
                模板参数(默认与新闻相同):</td>
            <td class="tdbg" colspan="2" style="height: 27px">
                <cc1:FormValidation ID="CX_Collect_Class_Itemplitate_Parame" runat="server" CssClass="alpha"
                    datatype="Require" Width="474px" 是否验试="不验试" MaxLength="100"></cc1:FormValidation></td>
        </tr>
        <tr>
            <td class="tdbg" height="27">
                采集参数:</td>
            <td class="tdbg" height="27" colspan="2">
                <input id="CX_Collect_Class_Parame" type="checkbox" runat="server" />保存远程图片</td>
        </tr>
     
        <tr>
            <td class="tdbg" style="height: 27px">
                过滤选项:</td>
            <td class="tdbg" colspan="2" style="height: 27px">
                HTML
                <input type="checkbox" checked="checked" value="HTML" name="CX_Collect_Class_Filtrate_HTML" id="CX_Collect_Class_Filtrate_HTML" runat="server" />
                STYLE
                <input type="checkbox" checked="checked" value="STYLE" name="CX_Collect_Class_Filtrate_STYLE" id="CX_Collect_Class_Filtrate_STYLE" runat="server" />
                DIV
                <input type="checkbox" value="DIV" name="CX_Collect_Class_Filtrate_DIV" id="CX_Collect_Class_Filtrate_DIV" runat="server" />
                A
                <input type="checkbox" checked="checked" value="A" name="CX_Collect_Class_Filtrate_A" id="CX_Collect_Class_Filtrate_A" runat="server" />
                CLASS
                <input type="checkbox" value="CLASS" name="CX_Collect_Class_Filtrate_CLASS" id="CX_Collect_Class_Filtrate_CLASS" runat="server" />
                FONT
                <input type="checkbox" checked="checked" value="FONT" name="CX_Collect_Class_Filtrate_FONT" id="CX_Collect_Class_Filtrate_FONT" runat="server" />
                SPAN
                <input type="checkbox" value="SPAN" name="CX_Collect_Class_Filtrate_SPAN" id="CX_Collect_Class_Filtrate_SPAN" runat="server" />
                OBJECT
                <input type="checkbox" checked="checked" value="OBJECT" name="CX_Collect_Class_Filtrate_OBJECT" id="CX_Collect_Class_Filtrate_OBJECT" runat="server" />
                IFRAME
                <input type="checkbox" checked="checked" value="IFRAME" name="CX_Collect_Class_Filtrate_IFRAME" id="CX_Collect_Class_Filtrate_IFRAME" runat="server" />
                SCRIPT
                <input type="checkbox" checked="checked" value="SCRIPT" name="CX_Collect_Class_Filtrate_SCRIPT" id="CX_Collect_Class_Filtrate_SCRIPT" runat="server" /> 
                
                        </td>
        </tr>
        <!-- 不支持此功能
        <tr>
            <td class="tdbg" style="height: 27px">
                采集生成文件前缀名:            </td>
            <td class="tdbg" style="height: 27px" colspan="2">
                <cc1:FormValidation ID="CX_Collect_Class_CrtFileName" runat="server" CssClass="font-2" datatype="NoVeri" 是否验试="验试"></cc1:FormValidation></td>
        </tr>
        -->
        <tr>
            <td class="tdbg" style="height: 27px">
                图片保存路径:</td>
            <td class="tdbg" colspan="2" style="height: 27px">
                <cc1:FormValidation ID="CX_Collect_Class_UpFile" runat="server">/upfiles/</cc1:FormValidation></td>
        </tr>
        <tr>
            <td class="tdbg" height="27">
                采集作者:</td>
            <td class="tdbg" height="27" colspan="2">
                <cc1:FormValidation ID="CX_Collect_Class_Creater" runat="server" datatype="Require" 是否验试="验试"></cc1:FormValidation>
                                       <select id="Authors" runat="server">
                          <option value="无名">无名</option>
                          <option value="本站">本站</option>
                          <option value="未知" selected="selected">未知</option>
                          
                        </select>
                
                </td>
        </tr>
        <tr>
            <td class="tdbg" height="27">
                <span class="font-5">
                步骤: 1
                </span>
                <br />
                <br />
                采集条件 采集内容列表:<br />
                <br />
                <span class="font-2">&nbsp;点击加入:<a href="javascript:ChageValue('strlist','<%=StrList%>');" class="link2" style="cursor:pointer;" id="strlist">[内容列表]</a></span></td>
            <td height="27" class="tdbg" style="width: 531px">
                <asp:TextBox ID="CX_Collect_Class_List" runat="server" CssClass="box" Height="188px" TextMode="MultiLine"
                    Width="553px">[内容列表]</asp:TextBox></td>
            <td width="787" height="27" class="tdbg">            
                <input id="Button2"  class="box" type="button" onclick="PageList('CollectExe/testList.aspx')" value="测试采集数据" /><br />
                <br />
                <asp:HyperLink ID="HyperLink1" runat="server" CssClass="link1">如何使用</asp:HyperLink><br />
                <br />
                注意:文本框 不能有 单引号 " ' "
            </td>
        </tr>
        <tr>
            <td class="tdbg" style="height: 27px">            
                <span style="color: #ff0100">步骤: 2</span><br />
                <br />
                采集条件 链接到内容页:&nbsp;<br />
                <span class="font-2">
                    <br />
                    &nbsp;点击加入:<a href="javascript:ChageValue('strlink','<%=StrLink %>');" class="link2" style="cursor:pointer;" id="strlink">[链接到内容页]</a></span></td>
            <td class="tdbg" style="width: 531px; height: 27px;">            
                <asp:TextBox ID="CX_Collect_Class_Link" runat="server" CssClass="box" Height="108px" TextMode="MultiLine"
                    Width="553px">[链接到内容页]</asp:TextBox></td>
            <td class="tdbg" style="height: 27px">            
                <input id="Button3" runat="server" class="box" type="button" value="测试采集数据" onclick="Pagelink('CollectExe/testContPage.aspx')" /><br />
                <br />
                <asp:HyperLink ID="HyperLink2" runat="server" CssClass="link1">如何使用</asp:HyperLink><br />
                <br />
                注意:文本框 不能有 单引号 " ' "
            </td>
        </tr>
        <tr>
            <td class="tdbg" rowspan="2">            
                <span style="color: #ff0100">步骤: 3 最后一步<br />
                </span>
                <br />
                采集条件 内容页标题与内容:<br />
                <br />
                <span style="color: #3366cc">点击加入:</span><a href="javascript:ChageValue('strtitle','<%=StrTitle %>');" class="link2" style="cursor:pointer;" id="strtitle" >[内容页标题]</a><br />
                <br />
                <span style="color: #3366cc">点击加入:</span><a href="javascript:ChageValue('strcontont','<%=StrContont %>');" class="link2" style="cursor:pointer;" id="strcontont">[内容页内容]</a></td>
            <td class="tdbg" style="width: 531px; height: 118px;">            
                <asp:TextBox ID="CX_Collect_Class_Title" runat="server" CssClass="box" Height="87px" TextMode="MultiLine"
                    Width="553px">[内容页标题]</asp:TextBox></td>
            <td class="tdbg" rowspan="2">            <input id="Button4" runat="server" class="box" type="button" value="测试采集数据"  onclick="PageCont('CollectExe/testCont.aspx');"/><br />
                <br />
                <asp:HyperLink ID="HyperLink3" runat="server" CssClass="link1">如何使用</asp:HyperLink><br />
                <br />
                注意:文本框 不能有 单引号 " ' "
            </td>
        </tr>
        <tr>
            <td class="tdbg" height="27" style="width: 531px">
                <asp:TextBox ID="CX_Collect_Class_Contont" runat="server" CssClass="box" Height="139px" TextMode="MultiLine"
                    Width="553px">[内容页内容]</asp:TextBox></td>
        </tr>
        <tr>
            <td class="tdbg" style="height: 27px">
            </td>
            <td class="tdbg" style="width: 531px; height: 27px;">
            </td>
            <td class="tdbg" style="height: 27px">
            </td>
        </tr>
        <tr>
            <td class="tdbg" colspan="3" height="27">
                <center>
                    <asp:Button ID="Button1" runat="server" Text="确定保存" OnClick="Button1_Click" /></center>            </td>
        </tr>
    </table>
  <script language="javascript" type="text/javascript">
    function CXgetVlaues(Id)
    {
        <%=str %>
    }
    
    ///改变值参数
    ///参数 obj 为要 得到文字的对象 
    ///objid 为要改变的对象参数
    function ChageValue(obj,objid)
    {
       //.value =;
       //调用 光标处插入
       insertAtCaret(document.getElementById(objid), document.getElementById(obj).innerHTML);
    }
    
    function PageList(Page)
    {
        var pagecode=escape(document.getElementById('<%=CX_Collect_Class_CharSet.ClientID %>').value);
        var pageURL = escape(document.getElementById('<%=CX_Collect_Class_Page.ClientID %>').value);
        
        var RegexStr = escape(document.getElementById('<%=StrList %>').value) ;
        window.open(''+Page+'?pagecode='+pagecode+'&pageURL='+pageURL+'&RegexStr='+RegexStr+'','','status=no,scrollbars=yes,top=20,left=110,width=800,height=800');
    }
    
    //LINK 到内容页面 
    
     function Pagelink(Page)
    {
        var pagecode=escape(document.getElementById('<%=CX_Collect_Class_CharSet.ClientID %>').value);
        var pageURL = escape(document.getElementById('<%=CX_Collect_Class_Page.ClientID %>').value);
        
        var RegexStr = escape(document.getElementById('<%=StrLink %>').value) ;
        window.open(''+Page+'?pagecode='+pagecode+'&pageURL='+pageURL+'&RegexStr='+RegexStr+'','','status=no,scrollbars=yes,top=20,left=110,width=800,height=800');
    }
    
    
    //得到内容的东东
    function PageCont(Page)
    {
        var pagecode=escape(document.getElementById('<%=CX_Collect_Class_CharSet.ClientID %>').value);
        var pageURL = escape(document.getElementById('<%=CX_Collect_Class_Page.ClientID %>').value);
        var RegexStrCont = escape(document.getElementById('<%=StrContont %>').value) ;
        var RegexStrTitle = escape(document.getElementById('<%=StrTitle %>').value) ;
        //开始得到 选定替换的标签
        
        var	        TagObject   =   document.getElementById('<%=CX_Collect_Class_Filtrate_OBJECT.ClientID %>').checked;
        var	        TagHTML   =   document.getElementById('<%=CX_Collect_Class_Filtrate_HTML.ClientID %>').checked; 
        var	        TagSTYLE   =   document.getElementById('<%=CX_Collect_Class_Filtrate_STYLE.ClientID %>').checked; 
        var	        TagDIV   =   document.getElementById('<%=CX_Collect_Class_Filtrate_DIV.ClientID %>').checked; 
        var	        TagCLASS   =   document.getElementById('<%=CX_Collect_Class_Filtrate_CLASS.ClientID %>').checked; 
        var	        TagFONT   =   document.getElementById('<%=CX_Collect_Class_Filtrate_FONT.ClientID %>').checked; 
        var	        TagSPAN   =   document.getElementById('<%=CX_Collect_Class_Filtrate_SPAN.ClientID %>').checked; 
        var	        TagIFRAME   =   document.getElementById('<%=CX_Collect_Class_Filtrate_IFRAME.ClientID %>').checked; 
        var	        TagSCRIPT   =   document.getElementById('<%=CX_Collect_Class_Filtrate_SCRIPT.ClientID %>').checked; 
        var         TagA   =   document.getElementById('<%=CX_Collect_Class_Filtrate_A.ClientID %>').checked; 
        
        var checrvalues = '&TagObject='+TagObject+'&TagHTML='+TagObject+'&TagSTYLE='+TagSTYLE+'&TagDIV='+TagDIV+'&TagCLASS='+TagCLASS+'&TagFONT='+TagFONT+'&TagSPAN='+TagSPAN+'&TagIFRAME='+TagIFRAME+' &TagSCRIPT='+TagSCRIPT+'&TagA='+TagA+'';
        
        
        window.open(''+Page+'?pagecode='+pagecode+checrvalues+'&pageURL='+pageURL+'&RegexStrCont='+RegexStrCont+'&RegexStrTitle='+RegexStrTitle+'','','status=no,scrollbars=yes,top=20,left=110,width=800,height=800');
    }
    
    
  </script>
</asp:Content>  

